package com.young.manager.controller;

import com.young.common.interf.IBaseController;
import com.young.common.model.ResultData;
import com.young.manager.service.DictService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("dict")
@RestController
@Slf4j
@RequiredArgsConstructor
public class DictController implements IBaseController {

  private final DictService dictService;

  @GetMapping("area")
  ResultData<?> queryDictArea(@RequestParam(required = false) Long parentId) {
    return success(dictService.queryChinaAreaList(parentId));
  }

}
